package Modele;

/**
 *
 * @author Dak
 */

//Caretaker = History list
public class State {
    private String buffer="";
    private int sel_debut=0;
    private int sel_fin=0;
    private boolean macroEnabled=false; //changer pour record live status
    private int position_cusor=0;
    private String presse_papier="";
    private Character last_char=null;
    private boolean undoable = false;

    public State(String buffer, int sel_debut, int sel_fin, boolean Selection, int position_cusor, String presse_papier, Character c, boolean undo) {
        this.buffer = buffer;
        this.sel_debut = sel_debut;
        this.sel_fin = sel_fin;
        this.macroEnabled = Selection;
        this.position_cusor = position_cusor;
        this.presse_papier = presse_papier;
        this.last_char = c;
        undoable = undo;
    }

    public boolean isSelected(){
        return (sel_fin-sel_debut==0);
    }

    public boolean isUndoable() {
        return undoable;
    }

    public void setUndoable(boolean undoable) {
        this.undoable = undoable;
    }

    public void setSelection(boolean Selection) {
        this.macroEnabled = Selection;
    }

    public String getBuffer() {
        return buffer;
    }

    public void setBuffer(String buffer) {
        this.buffer = buffer;
    }

    public int getPosition_cusor() {
        return position_cusor;
    }

    public void setPosition_cusor(int position_cusor) {
        this.position_cusor = position_cusor;
    }

    public String getPresse_papier() {
        return presse_papier;
    }

    public void setPresse_papier(String presse_papier) {
        this.presse_papier = presse_papier;
    }

    public int getSel_debut() {
        return sel_debut;
    }

    public void setSel_debut(int sel_debut) {
        this.sel_debut = sel_debut;
    }

    public int getSel_fin() {
        return sel_fin;
    }

    public void setSel_fin(int sel_fin) {
        this.sel_fin = sel_fin;
    }

    public Character getLast_char() {
        return last_char;
    }

    public void setLast_char(Character last_char) {
        this.last_char = last_char;
    }


}
